<template>
	<view class="box">
		<view class="kapian_box" v-for="(item,index) in Account">
			<view class="top">
				<view class="top_left">{{item.time}}</view>
				<view class="top_right"><text></text></view>
			</view>
			<view class="bottom">
				<!-- <KapianAccount></KapianAccount> -->
				<view class="box">
					<template :class="item.Amount<0?'ico2':'ico2'">
						<view class="iconfont icon-jine left"></view>
					</template>
					<view class="zhong">{{item.message}}</view>
					<view class="right" v-if="item.Amount>0">+{{item.Amount}} 元</view>
					<view class="right" v-else-if="item.Amount<0">{{item.Amount}} 元</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import KapianAccount from './KapianAccount.vue'
	import {mapState} from 'vuex'
	export default {
		name: "Account",
		computed:{
			...mapState(['Account'])
		},
		data() {
			return {
				
			};
		},
		components:{
			KapianAccount 
		}
	}
</script>

<style lang="less">
	.ico1{
		color:red;
	}
	.ico2{
	color:#07C160;
	}
	.box{
		.kapian_box{
			border: 1px solid #ccc;
			border-radius: 20rpx;
			padding: 10rpx;
			margin-top: 10rpx;
			.top{
				display: flex;
				padding: 10rpx;
				view{
					margin: 0 10rpx;
				}
			}
			.bottom{
				view{
					// 溢出省略号
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					letter-spacing:1pt;
				}
				.box{
					display: flex;
					justify-content: space-between;
					.left{
						font-size: 28rpx;
						padding-left: 20rpx;
					}
					.zhong{
						
					}
					.right{
						padding-right: 10rpx;
					}
				}
			}
		}
	}

</style>
